POST
/
1
/
indexes
/
{indexName}
/
facets
/
{facetName}
/
query
// Initialize the client
var client = new SearchClient(new SearchConfig("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY"));

// Call the API
var response = await client.SearchForFacetValuesAsync("<YOUR_INDEX_NAME>", "facetName");
// >LOG
{
  "facetHits": [
    {
      "value": "Mobile phone",
      "highlighted": "<em>George</em> <em>Clo</em>oney",
      "count": 123
    }
  ],
  "exhaustiveFacetsCount": true,
  "processingTimeMS": 20
}

Authorizations

x-algolia-application-id
string
header
required

Your Algolia application ID.

x-algolia-api-key
string
header
required

Your Algolia API key with the necessary permissions to make the request. Permissions are controlled through access control lists (ACL) and access restrictions. The required ACL to make a request is listed in each endpoint's reference.

Path Parameters

indexName
string
required

Name of the index on which to perform the operation.

Example:

"ALGOLIA_INDEX_NAME"

facetName
string
required

Facet attribute in which to search for values.

This attribute must be included in the attributesForFaceting index setting with the searchable() modifier.

Body

application/json

Response

200
application/json

OK

The response is of type object.